<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:76:"D:\wamp\www\shop\public/../application/madmin\view\WechatConfig\showAdd.html";i:1548227842;s:71:"D:\wamp\www\shop\public/../application/madmin\view\Public\showBase.html";i:1547543098;}*/ ?>
<!DOCTYPE HTML>
<html>
	<head>
		<title>后台管理</title>
	    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	    <meta charset="UTF-8" />
	    <link rel="icon" type="image/ico" href="__IMG__/favicon.ico" />
	    <link type="text/css" rel="stylesheet" href="__CSS__/vendor/bootstrap/bootstrap.min.css" />
	    <link type="text/css" rel="stylesheet" href="__CSS__/content.css" />
		<link type="text/css" rel="stylesheet" href="__CSS__/vendor/font-awesome.css" />
		<link type="text/css" rel="stylesheet" href="__CSS__/vendor/bootstrap-checkbox.css" />
		<link type="text/css" rel="stylesheet" href="__JS__/vendor/chosen/css/chosen.min.css" />
		<link type="text/css" rel="stylesheet" href="__JS__/vendor/chosen/css/chosen-bootstrap.css" />
		<link type="text/css" rel="stylesheet" href="__CSS__/nicescroll.css" />
        <link type="text/css" rel="stylesheet" href="__CSS__/adapt.css" />
        <link type="text/css" rel="stylesheet" href="__CSS__/pagination.css" />
        <link type="text/css" rel="stylesheet" href="__CSS__/buttons.css" />
		<script type="text/javascript" src="__JS__/jquery-3.3.1.min.js"></script>
		<script type="text/javascript" src="__JS__/vendor/layer/layer.js"></script>
		<script type="text/javascript" src="__JS__/vendor/bootstrap/bootstrap.min.js"></script>
		<script type="text/javascript" src="__JS__/vendor/nicescroll/jquery.nicescroll.min.js"></script>
		<script type="text/javascript" src="__JS__/vendor/chosen/chosen.jquery.min.js"></script>
		<script type="text/javascript" src="__JS__/content.js"></script>
	</head>
	<body class="no-bg">
		<div id="wrap">
	        <div class="row">
	            <div id="content" class="col-md-12">
	            	
<div class="main">
    <div class="row">
        <div class="col-md-12">
            <section class="tile color transparent-black">
                <div class="tile-header bg-transparent-black-2">
                    <h1>
                        <?php if($Info == ''): ?>
                            <?php echo lang('WxPzXz'); else: ?>
                            <?php echo lang('WxPzGx'); endif; ?>
                    </h1>
                    <div class="controls">
                        <a href="javascript:void(0);" onclick="window.history.back();"><i class="fa fa-arrow-left"></i></a>
                        <?php if($Info == ''): ?>
                            <a href="<?php echo url('WechatConfig/showAdd'); ?>"><i class="fa fa-refresh"></i></a>
                        <?php else: ?>
                            <a href="<?php echo url('WechatConfig/showEdit', array('id'=>$Info['wechat_id'])); ?>"><i class="fa fa-refresh"></i></a>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="tile-body nopadding">
                    <form class="FormTable" action="" method="post">
                        <div class="tile-body">
                            <div class="row">
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('WxPzFz'); ?></label>
                                    <select class="chosen-select chosen-transparent form-control" name="wechat_group">
                                        <?php if(is_array($Group) || $Group instanceof \think\Collection || $Group instanceof \think\Paginator): $i = 0; $__LIST__ = $Group;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                                            <option value="<?php echo $vo['content_value']; ?>" <?php if($Info['wechat_group'] == $vo['content_value']): ?>selected<?php endif; ?>><?php echo $vo['content_name']; ?></option>
                                        <?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('WxPzBs'); ?></label>
                                    <input type="text" class="form-control required" name="wechat_name" value="<?php echo $Info['wechat_name']; ?>" placeholder="<?php echo lang('WxPzBsWk'); ?><?php echo lang('WxPzBsAl'); ?>">
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('WxPzMc'); ?></label>
                                    <input type="text" class="form-control required" name="wechat_title" value="<?php echo $Info['wechat_title']; ?>" placeholder="<?php echo lang('WxPzMcWk'); ?>">
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('WxPzLx'); ?></label>
                                    <select class="chosen-select chosen-transparent form-control" name="wechat_type" id="wechat_type">
                                        <option value="1" <?php if($Info['wechat_type'] == '1'): ?>selected<?php endif; ?>><?php echo lang('WxPzLx1'); ?></option>
                                        <option value="2" <?php if($Info['wechat_type'] == '2'): ?>selected<?php endif; ?>><?php echo lang('WxPzLx2'); ?></option>
                                    </select>
                                </div>
                                <div class="form-group col-sm-12" id="div_input">
                                    <label><?php echo lang('WxPzNr'); ?></label>
                                    <input type="text" class="form-control" name="wechat_value" value="<?php echo $Info['wechat_value']; ?>" id="wechat_input" placeholder="<?php echo lang('WxPzNrWk'); ?>">
                                </div>
                                <div class="form-group col-sm-12" id="div_select" style="display:none">
                                    <label><?php echo lang('WxPzXl'); ?></label>
                                    <input type="text" class="form-control" name="wechat_select" value="<?php echo $Info['wechat_select']; ?>" id="wechat_select" placeholder="<?php echo lang('WxPzXlWk'); ?><?php echo lang('WxPzXlAl'); ?>">
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('WxPzSm'); ?></label>
                                    <input type="text" class="form-control" name="wechat_remark" value="<?php echo $Info['wechat_remark']; ?>" placeholder="<?php echo lang('WxPzSmWk'); ?>">
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('WxPzXs'); ?></label>
                                    <select class="chosen-select chosen-transparent form-control" name="wechat_show">
                                        <option value="2" <?php if($Info['wechat_show'] == '2'): ?>selected<?php endif; ?>><?php echo lang('WxPzXs2'); ?></option>
                                        <option value="1" <?php if($Info['wechat_show'] == '1'): ?>selected<?php endif; ?>><?php echo lang('WxPzXs1'); ?></option>
                                    </select>
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('WxPzPx'); ?></label>
                                    <input type="text" class="form-control" name="wechat_sort" value="<?php echo (isset($Info['config_sort']) && ($Info['config_sort'] !== '')?$Info['config_sort']:0); ?>" placeholder="<?php echo lang('WxPzPxWk'); ?><?php echo lang('WxPzPxAl'); ?>">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="tile-footer bg-transparent-black-2 rounded-bottom-corners">
                    <div class="row">
                        <div class="col-sm-12 text-center">
                            <button type="button" class="btn btn-<?php echo config('CNF_BTNCOLOR'); ?> ajax-post"><?php echo lang('Form_Submit'); ?></button>
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </div>
</div>

	        	</div>
	        </div>
	    </div>
		
    <script>
        $(function(){
            <?php if($Info['wechat_type'] == 1): ?>
                $('#div_input').show();
                $('#div_select').hide();
            <?php elseif($Info['wechat_type'] == 2): ?>
                $('#div_input,#div_select').show();
            <?php endif; ?>

            $('#wechat_type').change(function(){
                $('#wechat_input,#wechat_select').val('');
                var wechat_type = $('#wechat_type').val();
                if(wechat_type == 1){
                    $('#div_input').show();
                    $('#div_select').hide();
                }else if(wechat_type == 2){
                    $('#div_input,#div_select').show();
                }
            });
        })
    </script>

	</body>
</html>